using Sirenix.OdinInspector;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;

public class VActState_Loader : MonoBehaviour
{
    //这里可重载的定义了所有的状态操作
    //这里不清楚什么情况下会掉引用
    [SerializeReference]
    public VActStateBase overrideState;
    public void Init(VActProcessor vActProcessor, VActInput vActInput , VActStateBase settingState=null)
    {
        if (settingState != null)
        {
            overrideState = settingState;
            settingState.InitLoader(vActProcessor, vActInput);
        }
        else if (overrideState == null) 
        {
            Reset();
        }
        overrideState.InitLoader(vActProcessor, vActInput);
    }
    private void Reset()
    {
        overrideState = new VActStateBaseOverride();
    }
}
